<?php
/**
 * Class descript.
 * User: chen guang 
 * Date: 2017/10/26 15:29
 */
namespace app\api\controller;
use \app\api\logic\Center as CenterLogic;
use think\Controller;
use think\Request;
class Center extends Base
{
	//检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'except' => 'except'
        ],
    ];
	public function __construct(Request $request){
        parent::__construct($request);
		$this->request = $request;
        $this->CenterLogic = new CenterLogic();//逻辑业务
    }
	//个人资料/会员中心
    public function center(){
    	return $this->ajaxReturn(
            $this->CenterLogic->center()
        );
    }
	//修改资料
    public function modify(){
    	return $this->ajaxReturn(
            $this->CenterLogic->modify()
        );
    }
	//绑定手机
    public function bind(){
    	return $this->ajaxReturn(
            $this->CenterLogic->bind()
        );
    }
    /**
     * 个人二维码
     */
    public function qrcode()
    {
        $result =  (new \app\api\logic\Center())->qrcode();
        return $this->ajaxReturn($result);
    }

    /**
     * 系统信息
     */
    public function system()
    {
        $result =  (new \app\api\logic\Center())->system();
        return $this->ajaxReturn($result);
    }
    /**
     * 系统信息已读
     */
    public function read()
    {
        $result =  (new \app\api\logic\Center())->read();
        return $this->ajaxReturn($result);
    }

    /**
     * 订单优惠券信息
     */
    public function information()
    {
        $result =  (new \app\api\logic\Center())->information();
        return $this->ajaxReturn($result);
    }
    /**
     * 订单优惠券信息已读
     */
    public function reader()
    {
        $result =  (new \app\api\logic\Center())->reader();
        return $this->ajaxReturn($result);
    }
    /**
     * 订单优惠券信息删除
     */
    public function delete()
    {
        $result =  (new \app\api\logic\Center())->delete();
        return $this->ajaxReturn($result);
    }
    /**
     * 系统信息设置删除
     */
    public function del()
    {
        $result =  (new \app\api\logic\Center())->del();
        return $this->ajaxReturn($result);
    }

    /**
     * 系统信息
     */
    public function tip()
    {
        $result =  (new \app\api\logic\Center())->tip();
        return $this->ajaxReturn($result);
    }
    /**
     * 系统信息详情
     */
    public function newsdetail()
    {
        $result =  (new \app\api\logic\Center())->newsdetail();
        return $this->ajaxReturn($result);
    }
}